﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NEXEntidad;

public partial class WebControls_Cabecera : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
    {
        Usuario unUsuario = new Usuario(Login1.UserName, Login1.Password);
        Login1.DestinationPageUrl = HttpContext.Current.Request.Url.PathAndQuery;
        Session.Add("Usuario", unUsuario);
        e.Authenticated = unUsuario.LoguearUsuario();
    }

    protected void btnEventosCulturales_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            Response.Redirect("ListarEventos.aspx");
        }
        catch (Exception ex)
        {
            
            throw ex;
        }
        
    }
}
